using System;
using System.Data;
using System.Collections.Generic;
using System.Data.SqlClient;

namespace DataAccess
{
    public class tbGroup : Popular
    {

        Common<tbGroup> cm = new Common<tbGroup>();
        public int GroupId { get; set; }
        public string GroupName { get; set; }
        public string Note { get; set; }

        public bool Insert(Popular b)
        {
            return cm.Insert(b as tbGroup, "sp_tbGroup_Insert");
        }
        public bool Update(Popular b)
        {
            return cm.UpDate(b as tbGroup, "sp_tbGroup_Update");
        }
        public bool Delete(object b)
        {
            return cm.Delete(b, "sp_tbGroup_Delete");
        }
        public IDataReader Select_ID(object b)
        {
            return cm.Select_ID(b, "sp_tbGroup_SelectByID");
        }
        public IDataReader Select_Name(object b)
        {
            return cm.Select_Name(b, "sp_tbGroup_SelectByName");
        }
        public IDataReader SelectAll()
        {
            return cm.Select_All("sp_tbGroup_SelectAll");
        }
        public List<tbGroup> SelectAllToList()
        {
            return cm.SelectAll<tbGroup>("sp_tbGroup_SelectAll");
        }
    }
}